<html>
  <head>
    <meta name="viewport" content="width=device-width, initial-scale=1" charset="UTF-8">
    <title>LogRecordInterceptor</title>
<link href="../../../../../../images/logo-icon.svg" rel="icon" type="image/svg"><script>var pathToRoot = "../../../";</script><script type="text/javascript" src="../../../scripts/sourceset_dependencies.js" async="async"></script><link href="../../../styles/style.css" rel="Stylesheet"><link href="../../../styles/logo-styles.css" rel="Stylesheet"><link href="../../../styles/jetbrains-mono.css" rel="Stylesheet"><link href="../../../styles/main.css" rel="Stylesheet"><script type="text/javascript" src="../../../scripts/clipboard.js" async="async"></script><script type="text/javascript" src="../../../scripts/navigation-loader.js" async="async"></script><script type="text/javascript" src="../../../scripts/platform-content-handler.js" async="async"></script><script type="text/javascript" src="../../../scripts/main.js" async="async"></script>  </head>
  <body>
    <div id="container">
      <div id="leftColumn"><a href="../../../index.html">
          <div id="logo"></div>
        </a>
        <div id="paneSearch"></div>
        <div id="sideMenu"></div>
      </div>
      <div id="main">
        <div id="leftToggler"><span class="icon-toggler"></span></div>
<script type="text/javascript" src="../../../scripts/main.js"></script>        <div class="main-content" id="content" pageIds="Net::com.drake.net.interceptor/LogRecordInterceptor///PointingToDeclaration//1281733757">
          <div class="navigation-wrapper" id="navigation-wrapper">
            <div class="breadcrumbs"><a href="../../../index.html">Net</a>/<a href="../index.html">com.drake.net.interceptor</a>/<a href="index.html">LogRecordInterceptor</a></div>
            <div class="pull-right d-flex">
              <div id="searchBar"></div>
            </div>
          </div>
          <div class="cover ">
            <h1 class="cover"><span>Log</span><wbr></wbr><span>Record</span><wbr></wbr><span>Interceptor</span></h1>
            <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-depenent-content" data-active="" data-togglable=":net:dokkaHtml/release"><div class="symbol monospace">open class <a href="index.html">LogRecordInterceptor</a> <span>@<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.jvm/-jvm-overloads/index.html">JvmOverloads</a>() </span>constructor(enabled: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a>, requestByteCount: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html">Long</a>, responseByteCount: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html">Long</a>) : <span data-unresolved-link="okhttp3/Interceptor///PointingToDeclaration/">Interceptor</span><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><p class="paragraph">网络日志记录器 可以参考此拦截器为项目中其他网络请求库配置. 本拦截器属于标准的OkHttp拦截器适用于所有OkHttp拦截器内核的网络请求库</p><p class="paragraph">在正式环境下请禁用此日志记录器. 因为他会消耗少量网络速度</p></div></div>
          </div>
          <div class="tabbedcontent">
            <div class="tabs-section" tabs-section="tabs-section"><button class="section-tab" data-active="" data-togglable="Constructors">Constructors</button><button class="section-tab" data-togglable="Functions">Functions</button><button class="section-tab" data-togglable="Properties">Properties</button></div>
            <div class="tabs-section-body">
              <h2 class="tabbedcontent">Constructors</h2>
              <div class="table" data-togglable="Constructors"><a data-name="1018581616%2FConstructors%2F1281733757" anchor-label="LogRecordInterceptor" id="1018581616%2FConstructors%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a>
                <div class="table-row" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release">
                  <div class="main-subrow keyValue TabbedContent">
                    <div class=""><span class="inline-flex"><a href="-log-record-interceptor.html">LogRecordInterceptor</a><span class="anchor-wrapper"><span class="anchor-icon" pointing-to="1018581616%2FConstructors%2F1281733757"></span>
                          <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                        </span></span></div>
                    <div>
                      <div class="title">
                        <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-depenent-content" data-active="" data-togglable=":net:dokkaHtml/release"><div class="symbol monospace"><div class="block"><div class="block">@<a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin.jvm/-jvm-overloads/index.html">JvmOverloads</a>()</div></div>fun <a href="-log-record-interceptor.html">LogRecordInterceptor</a>(enabled: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a>, requestByteCount: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html">Long</a> = 1024 * 1024, responseByteCount: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html">Long</a> = 1024 * 1024 * 4)<span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div></div></div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
              <h2 class="">Functions</h2>
              <div class="table" data-togglable="Functions"><a data-name="-746983624%2FFunctions%2F1281733757" anchor-label="intercept" id="-746983624%2FFunctions%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a>
                <div class="table-row" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release">
                  <div class="main-subrow keyValue ">
                    <div class=""><span class="inline-flex"><a href="intercept.html">intercept</a><span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-746983624%2FFunctions%2F1281733757"></span>
                          <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                        </span></span></div>
                    <div>
                      <div class="title"><div class="divergent-group" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release"><div class="with-platform-tags"><span class="pull-right"></span></div>

  <div>
    <div class="platform-hinted " data-platform-hinted="data-platform-hinted"><div class="content sourceset-depenent-content" data-active="" data-togglable=":net:dokkaHtml/release"><div class="symbol monospace">open override fun <a href="intercept.html">intercept</a>(chain: <span data-unresolved-link="okhttp3/Interceptor.Chain///PointingToDeclaration/">Interceptor.Chain</span>): <span data-unresolved-link="okhttp3/Response///PointingToDeclaration/">Response</span><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div></div></div>
  </div>
</div>
</div>
                    </div>
                  </div>
                </div>
              </div>
              <h2 class="">Properties</h2>
              <div class="table" data-togglable="Properties"><a data-name="-1709021422%2FProperties%2F1281733757" anchor-label="enabled" id="-1709021422%2FProperties%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a>
                <div class="table-row" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release">
                  <div class="main-subrow keyValue ">
                    <div class=""><span class="inline-flex"><a href="enabled.html">enabled</a><span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-1709021422%2FProperties%2F1281733757"></span>
                          <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                        </span></span></div>
                    <div>
                      <div class="title">
                        <div class="platform-hinted " data-platform-hinted="data-platform-hinted" data-togglable="Properties"><div class="content sourceset-depenent-content" data-active="" data-togglable=":net:dokkaHtml/release"><a data-name="-1709021422%2FProperties%2F1281733757" anchor-label="enabled" id="-1709021422%2FProperties%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a><div class="symbol monospace">var <a href="enabled.html">enabled</a>: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-boolean/index.html">Boolean</a><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><div class="brief "><a data-name="-1709021422%2FProperties%2F1281733757" anchor-label="enabled" id="-1709021422%2FProperties%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a>是否启用日志输出</div></div></div>
                      </div>
                    </div>
                  </div>
                </div>
<a data-name="-678200081%2FProperties%2F1281733757" anchor-label="requestByteCount" id="-678200081%2FProperties%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a>
                <div class="table-row" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release">
                  <div class="main-subrow keyValue ">
                    <div class=""><span class="inline-flex"><a href="request-byte-count.html">requestByteCount</a><span class="anchor-wrapper"><span class="anchor-icon" pointing-to="-678200081%2FProperties%2F1281733757"></span>
                          <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                        </span></span></div>
                    <div>
                      <div class="title">
                        <div class="platform-hinted " data-platform-hinted="data-platform-hinted" data-togglable="Properties"><div class="content sourceset-depenent-content" data-active="" data-togglable=":net:dokkaHtml/release"><a data-name="-678200081%2FProperties%2F1281733757" anchor-label="requestByteCount" id="-678200081%2FProperties%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a><div class="symbol monospace">var <a href="request-byte-count.html">requestByteCount</a>: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html">Long</a><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><div class="brief "><a data-name="-678200081%2FProperties%2F1281733757" anchor-label="requestByteCount" id="-678200081%2FProperties%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a>请求日志输出字节数, -1 则为全部</div></div></div>
                      </div>
                    </div>
                  </div>
                </div>
<a data-name="2130933965%2FProperties%2F1281733757" anchor-label="responseByteCount" id="2130933965%2FProperties%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a>
                <div class="table-row" data-filterable-current=":net:dokkaHtml/release" data-filterable-set=":net:dokkaHtml/release">
                  <div class="main-subrow keyValue ">
                    <div class=""><span class="inline-flex"><a href="response-byte-count.html">responseByteCount</a><span class="anchor-wrapper"><span class="anchor-icon" pointing-to="2130933965%2FProperties%2F1281733757"></span>
                          <div class="copy-popup-wrapper "><span class="copy-popup-icon"></span><span>Link copied to clipboard</span></div>
                        </span></span></div>
                    <div>
                      <div class="title">
                        <div class="platform-hinted " data-platform-hinted="data-platform-hinted" data-togglable="Properties"><div class="content sourceset-depenent-content" data-active="" data-togglable=":net:dokkaHtml/release"><a data-name="2130933965%2FProperties%2F1281733757" anchor-label="responseByteCount" id="2130933965%2FProperties%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a><div class="symbol monospace">var <a href="response-byte-count.html">responseByteCount</a>: <a href="https://kotlinlang.org/api/latest/jvm/stdlib/kotlin/-long/index.html">Long</a><span class="top-right-position"><span class="copy-icon"></span><div class="copy-popup-wrapper popup-to-left"><span class="copy-popup-icon"></span><span>Content copied to clipboard</span></div></span></div><div class="brief "><a data-name="2130933965%2FProperties%2F1281733757" anchor-label="responseByteCount" id="2130933965%2FProperties%2F1281733757" data-filterable-set=":net:dokkaHtml/release"></a>响应日志输出字节数, -1 则为全部</div></div></div>
                      </div>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <div class="footer"><span class="go-to-top-icon"><a href="#content"></a></span><span>© 2023 Copyright</span><span class="pull-right"><span>Generated by </span><a href="https://github.com/Kotlin/dokka"><span>dokka</span><span class="padded-icon"></span></a></span></div>
      </div>
    </div>
  </body>
</html>

